﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using _4T.BLL;
using _4T.Data;

namespace _4T
{
    public partial class Page : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
            //    form1.Action = Request.RawUrl;
            //}
            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                PersonalInfo user = new PersonalInfoBLL().GetPersonalInfo(Session["user"].ToString());

                if (user.IsFilter) liFilter.Visible = true;
                else liFilter.Visible = false;
                if (user.IsVerify) liVerify.Visible = true;
                else liVerify.Visible = false;
                if (user.IsApprove) liApprove.Visible = true;
                else liApprove.Visible = false;
                if (user.IsPayment) liPayment.Visible = true;
                else liPayment.Visible = false;
                if (user.IsAdmin)
                {
                    liStation.Visible = true;
                }
                else
                {
                    liStation.Visible = false;
                }
            }
        }
    }
}